package com.fs.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(description = "购物车展示层对象，用于返回给前端")
public class CartVO implements Serializable {

    @ApiModelProperty("购物车主键ID")
    private Long id;

    @ApiModelProperty("商品ID")
    private Long productId;

    @ApiModelProperty("商品名称")
    private String productName;

    @ApiModelProperty("商品封面图")
    private String productImage;

    @ApiModelProperty("商品单价")
    private BigDecimal price;

    @ApiModelProperty("购买数量")
    private Integer quantity;

    @ApiModelProperty("是否选中进行结算：1选中，0未选中")
    private Integer checked;

    @ApiModelProperty("加入购物车时间")
    private LocalDateTime createTime;

    @ApiModelProperty("该商品小计金额（price * quantity）")
    private BigDecimal subtotal;
}
